<h1>Didily Doers</h1>
<% for user in @users %>
  <p>
    <%= link_to user.login, user_path(user) %>
    <% if ( !current_user.nil? && current_user.role == 'admin') %>
      <%= link_to 'Edit', edit_user_path(user) %>
      <%= link_to 'Destroy', user_path(user), :confirm => 'Are you sure?', :method => :delete %>
    <% end %>
  </p>
<% end %>
